package com.gitee.simpleplus.nesty;

public interface NestyConst {

	public static final String NESTY_SERVER = "Nesty";
	public static final String HEADER_X_FORWARDED_FOR = "X-Forwarded-For";
	public static final String HEADER_CONTENT_LENGTH = "Content-Length";
	public static final String HEADER_CONTENT_TYPE = "Content-Type";
	public static final String HEADER_CONNECTION = "Connection";

	public static final String HEADER_SERVER = "Server";
	public static final String HEADER_REQUEST_ID = "Request-Id";
	public static final String HEADER_CONNECTION_KEEPALIVE = "keep-alive";
	public static final String HEADER_CONNECTION_CLOSE = "close";
	public static final String HEADER_CONTENT_TYPE_TEXT = "application/text";
	public static final String HEADER_CONTENT_TYPE_JSON = "application/json";
	
	public static enum RequestMethod {
	    GET, POST, PUT, DELETE, UNKOWN;
	}

	public static RequestMethod of(String s){
		try {
			return RequestMethod.valueOf(s.toUpperCase());
		} catch (Exception e) {
			return RequestMethod.UNKOWN;
		}
	}
}
